package com.wss.day07.exception;

/**
 * @author wangshaoshuai
 * @desc TODO
 * @date 2025/4/28
 */
public class Test {
    public static void main(String[] args) {
        ExceptionTest account = new ExceptionTest("123456", 1000.0);
        double withdrawAmount = 1500.0;
        try {
            account.withdraw(withdrawAmount);
        } catch (InsufficientBalanceException e) {
            System.out.println("取款失败：" + e.getMessage());
        } finally {
            System.out.println("当前账户余额：" + account.getBalance());
        }
    }
}
